<?php
/**
 * global.php
 * @fileoverview 引用公有类，并初始化公有数据
 * @author Lynk Li
 */
require_once("include/config.php");
require_once("include/data.php");
require_once("include/common.php");
require_once("include/security.php");
require_once("include/smarty/Smarty.class.php");
require_once("include/adodb/adodb.inc.php");

@session_start();
$CONFIG = new Config;
$GLOBAL['DATA'] = new Data;
$COMMON = new Common;
$SECURITY = new Security;

//create connection db object $DB
$DB = &ADONewConnection($CONFIG->db["type"]); // A new connection
$DB->PConnect($CONFIG->db["host"], $CONFIG->db["user"], $CONFIG->db["pass"], $CONFIG->db["name"]);
$DB->SetFetchMode(ADODB_FETCH_ASSOC);
$DB->Execute("SET NAMES 'utf8'");
?>